﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>仓库管理系统</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/outlook.js"></script>
    <script type="text/javascript">
	var count=0;
	var panelheight=0;
	var panelid='htmlMenuPanel0';
        if (getBrowser()==6) {
            $(document).ready(
                function() {  
					var w = ($(".formclass").width()-220)+"px";
                    $("#content").css({ width: w}); 				
                }
            );
        }
        
		function MenuControl(id)
		{			
			var temp=0;
		    for(i=0;i<id;++i)
			{
				temp=32*i+27;
			    $("#htmlMenuSelectItem"+i).css({"top":temp,"bottom":''});
				$("#htmlMenuPanel"+i).css({"position":'static'});
				$("#htmlMenuPanel"+i).css({"display":'none'});				
			}
            temp=0;
		    for(i=count-1;i>id;--i)
			{				
				
				temp2=32*temp;
			   $("#htmlMenuSelectItem"+i).css({"bottom":temp2,"top":''});
			   $("#htmlMenuPanel"+i).css({"position":'static'});
				$("#htmlMenuPanel"+i).css({"display":'none'});
				temp++;
			}
			temp=32*id+27;
			$("#htmlMenuSelectItem"+id).css({"top":temp,"bottom":''});
			$("#htmlMenuPanel"+id).css({"position":'absolute'});
			$("#htmlMenuPanel"+id).css({"display":'block'});
			$("#htmlMenuPanel"+id).css({"top":temp+32});
			panelheight=$("#navigation").css("height");
			panelheight=panelheight.replace('px','');
			panelheight=panelheight-27-count*32;
			$("#htmlMenuPanel"+id).css({"height":panelheight});
            panelid='htmlMenuPanel'+id;
		}		
		function load()
		{
		resizeWindow();
		count=<%=GetCount() %>;
        MenuControl(0);
		}
</script>
</head>
<body onresize="resizeWindow()" onload="load()" >
<form id="form1" runat="server" class="formclass">
 <div class="header">
            <div>
                欢迎 | <a href="#"><%=getUserName() %></a> |
                <a href="Logout.aspx" target="_self">退出</a> | <!--<a href="#">帮助</a>-->
            </div>
            <span class="title">仓库管理系统</span><br />
         <!--   <span style="margin-left: 5px;">Please visit original article at: <a href="http://www.jankoatwarpspeed.com/">www.jankoatwarpspeed.com</a></span>-->
        </div>
        <div class="toolbar">
            <div class="toolbarLeft">
            </div>
            <div class="toolbarContent">
                <a id="htmlMenuHide" href="javascript:setMenuHide();">
                    <img src="images/application_windows_left.png" alt="" />隐藏菜单</a> | <a href="index.aspx">
                        <img src="images/61.png" alt="" />返回首页</a> 
            </div>
            <div class="toolbarRight">
            </div>
			
            <div class="clear">
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="navigation" id="navigation">
		
            <div id="htmlSubHeader" runat="Server" class="subHeader">
                <div>
                    导航栏</div>
            </div>
            <asp:Repeater ID="TitleRepeater" runat="server" OnItemDataBound="TitleRepeater_ItemDataBound">
            <ItemTemplate>
            <div id="htmlMenuSelectItem<%# Eval("ID")%>" class="navSelectTitle" >              			
                <a href="#" onclick="MenuControl(<%# Eval("ID")%>);">
                    <img src="images/Modify.png" alt="" /><%# Eval("Title")%></a>
            </div>	            	
            <div id="htmlMenuPanel<%# Eval("ID")%>" class="navPanel" >
            <asp:Repeater ID="ItemRepeater" runat="server">
            <ItemTemplate>
                <a href=" <%# Eval("WebUrl")%>" target="MainFrame">
                    <img src="images/61.png" alt="" /><%# Eval("AuthorityName")%></a>
            </ItemTemplate>
            </asp:Repeater>                                
            </div>
            </ItemTemplate>
            </asp:Repeater>
        </div>
        <div class="content" id="content">
            <div class="subHeader">
                <div></div>
            </div>
            <div class="contentPanel" id="contentPanel">
                <iframe id="MainFrame" name="MainFrame" width="100%" height="99%" frameborder="0"
                    src="" style="border: 0px solid #cecece;">
                </iframe>
            </div>
        </div>
        <!--<div class="clear">
        </div>-->
</form>
</body>
</html>
